package com.hk.webapp.service.impl;

import com.hk.webapp.bean.SysAction;
import com.hk.webapp.dao.SysActionMapper;
import com.hk.webapp.vo.UpdateActionVo;
import com.hk.webapp.service.SysActionService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional(readOnly = true)
public class SysActionServiceImpl implements SysActionService {

    @Resource
    private SysActionMapper sysActionMapper;

    @Override
    public List<SysAction> getEntityList() {
        return sysActionMapper.getEntityList();
    }

    @Override
    public List<SysAction> getEntityByIds(List<Integer> ids) {
        return sysActionMapper.getEntityByIds(ids);
    }

    @Override
    @Transactional
    public int insert(SysAction sysAction) {
        return sysActionMapper.insertSelective(sysAction);
    }

    @Override
    @Transactional
    public int softDeletes(List<Integer> ids) {
        return sysActionMapper.softDeletes(ids);
    }

    @Override
    @Transactional
    public int updateField(UpdateActionVo vo) {
        return sysActionMapper.updateField(vo);
    }
}
